<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页内容</title>
  </head>

  <body>
    <h4>num1是:{{num1}}</h4>
    <h4>num2是:{{num2}}</h4>
    <h3>两个数字大的为:{{num1>num2?num1:num2}}</h3>

    <!-- 对象的使用 -->
    <div>{{ user.id }}</div>
    <div>{{ user.name }}</div>
    <div>{{ user.age }}</div>
    <div>{{ user['age'] }}</div>

    <!-- 数组的遍历 -->
    <ul>
      {{each books}}
      <li>{{$index}}---{{$value}}</li>
      {{/each}}
    </ul>

    <!-- 条件判断 -->
    {{ if user.name === "Jack"}}
    <p>{{ user.name }}的年龄是{{ user.age }}</p>
    {{/if}}
  </body>

</html>